package com.hyh.admin.domain.resources;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.hyh.ad.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel(value = "ResourcesViews对象", description = "资源浏览历史实体类")
public class ResourcesViews extends BaseEntity implements Serializable {

    /**
     * 资源浏览历史记录id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "资源浏览历史记录id")
    @JsonSerialize(using = ToStringSerializer.class) // 防止前端精度丢失

    private String id;

    /**
     * 资源id
     */
    @ApiModelProperty(value = "资源id")
    @JsonSerialize(using = ToStringSerializer.class) // 防止前端精度丢失

    private Long resourcesId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @JsonSerialize(using = ToStringSerializer.class) // 防止前端精度丢失

    private Long userId;

    /**
     * 浏览时长记录
     */
    @ApiModelProperty(value = "浏览时长记录")
    private String recentViewTime;

    /**
     * 是否完成观看
     */
    @ApiModelProperty(value = "是否完成观看")
    private Boolean isCompleted;
}
